import ollama

question = input("请输入问题：") or "20字介绍北京"

response = ollama.chat(
    model="qwen2.5:3b",
    stream=False, 
    messages=[
        {"role": "user", "content": question }
        ],
    options={
        "temperature": 0.5, 
        "top_p": 0.7, 
        "max_tokens": 200
        }
    )

answer=response['message']['content']

print("问:",question,"?\n答:", answer)